package com.example.fashion.android.home.adapter;

import android.support.v7.widget.RecyclerView;

import com.example.fashion.android.R;
import com.example.fashion.android.base.BaseAdapter.BaseRecyclerAdapter;
import com.example.fashion.android.base.BaseAdapter.RecyclerViewHolder;

import java.util.List;

/**
 * Created by fashion on 2017/7/8.
 * 主页的适配器
 */
public class HomeAdapter extends BaseRecyclerAdapter {
    List list;
    public HomeAdapter(RecyclerView view, List list, int itemLayoutId) {
        super(view, list, itemLayoutId);
        this.list = list;
    }

    @Override
    public void bindConvert(RecyclerViewHolder holder, int position, Object item, boolean isScrolling) {
        if(isScrolling) {
            //不滑动的时候去加载数据
            holder.setText(R.id.tv_title_name,  list.get(position).toString());
        }
    }
}


